using System;
using System.Windows;

namespace FluentSilverlight.Expressions.Font
{
    public class FontStyleExpression<TParentPart>
    {
        private readonly TParentPart parentPart;
        private readonly Action<FontStyle> setValue;

        public FontStyleExpression(TParentPart parentPart, Action<FontStyle> setValue)
        {
            this.parentPart = parentPart;
            this.setValue = setValue;
        }

        public TParentPart Italic()
        {
            setValue(FontStyles.Italic);
            return parentPart;
        }

        public TParentPart Normal()
        {
            setValue(FontStyles.Normal);
            return parentPart;
        }
    }
}